﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using MapEngine;

namespace GameEngine.View.Components
{
    public enum MapType { Isometric, Top };   
    public interface IMapView<MyIdType, BaseUIElementType>
        where MyIdType : IComparable<MyIdType>
    {
        void Initialize(GetHeightDelegate getHeight);

        void MouseOnItems(bool value);

        void ScaleMap(float p);

        void UpdateMapPosition();

        void UpdateTile(Point point);

        void UpdateMap();

        Point ViewSize { get; set; }

        Cursor Cursor { get; set; }

        Point MapSize { get; set; }

        Point TileSize { get; set; }

        Point MapPosition { get; set; }

        TileType TileType { get; set; }
        MapType MapType { get; set; }

        float MaxMapHeight { get; set; }
        
        float MinMapHeight { get; set; }

        float TileHeightUnit { get; set; }

        event TileMouseEventDelegate TileMouseEnter;
        event TileMouseEventDelegate TileMouseLeave;
        event TileMouseButtonEventDelegate TileMouseLeftButtonUp;
        event Action<Point> OnLayoutUpdate;

        void AddUIElement(IThingView<MyIdType, BaseUIElementType> p, Point point, float p_3);

        void UpdateUIElement(IThingView<MyIdType, BaseUIElementType> p, Point point, float p_3);

        void RemoveUIElement(IThingView<MyIdType, BaseUIElementType> p);
    }

    public delegate void TileMouseEventDelegate(Point tileCoords, MouseEventArgs e);
    public delegate void TileMouseButtonEventDelegate(Point tileCoords, MouseButtonEventArgs e);

}
